
 /**
 * BaseTestCase.java.java.
 * User: BrianChen Date: 2012-7-27 下午04:07:33
 *
 * Copyright (c) 2009 Hewlett-Packard Development Company, L.P.
 * All rights reserved.
 */
package com.collapsar.core.test.junit;

import junit.framework.TestCase;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * <pre>
 * REVISIONS: 
 * Version 	Date 		Author 			Description
 * ------------------------------------------------------------------- 
 * 1.0 		2012-7-27 	BrianChen 	1. Created this class. 
 * </pre>
 * 
 * @author BrianChen
 * @date 2012-7-27 下午04:07:33
 * @version 1.0
 * @see
 * 
 */
public abstract class BaseJunitTestCase extends TestCase{
	protected ApplicationContext applicationContext = null;
	
	@Override
	protected void setUp() throws Exception {
		super.setUp();
		this.applicationContext = new ClassPathXmlApplicationContext("applicationContext-*.xml");
		this.init();
	}
	
	/**
	 * 测试用例初始化
	 * 完成业务对象的获取操作，如：
	 * XXBean bean = this.applicationContext.getBean("beanName");
	 */
	protected abstract void init();

}

